position-based simulation of compliant constrained dynamics